import request from "@/utils/request";
import request2 from "@/utils/request2";
import request3 from "@/utils/request3";


// 登录 
export function loginBySocial(params) {
	return request.post('/app/blade-auth/token', params, true, {
		urlJoin: true
	});
}

// 自动登录 
export function loginAutoSocial() {
	return request.post('/app/blade-auth/oauth/token', {
		tenantId: '000000',
		grantType: 'open'
	}, true, {
		urlJoin: true
	});
}

/**
 * 获取部门信息
 * @returns
 */
export const getDeptDetail = (params) => request.get('/app/blade-system/dept/detail', params)

export function lobbyReception() {
	return request.get("/app/api/app/data/lobbyReception")
}

// 首页-事件中心
export function getMonitorItemList(params) {
	return request.get("/app/app/monitorItem", params)
}

// 实时事件列表
export function getAppUnsafeItem(params) {
	return request.get("/app/app/unsafeItem", params)
}

// 首页-事件中心-详情-核实
export function getMonitorItemVerify(params) {
	return request.get("/app/app/verify", params)
}
// 首页-事件中心-详情-核实
export function getMonitorHandleEvent(params) {
	return request.get("/app/app/handleEvent", params)
}
// 首页-事件中心-指标关联筛选接口
export function getSelectOid(params) {
	return request.get("/app/app/queryIndicatorInfoByGroupOid", params)
}
// 首页-事件中心-关联人员筛选接口
export function getSelectPeople(params) {
	return request.get("/app/app/queryHallWorkers", params)
}

// 首页-昨日办件
export function getYesterdayBj() {
	return request.get("/app/basicinfo/yesterday")
}
// 首页-超时办件
export function getOvertimeBj() {
	return request.get("/app/basicinfo/overTime")
}

// 窗口办件（排队量、多跑、办件突增、突减）
export function getWindowAbilityCount(params) {
	return request.get("/app/app/getWindowAbilityCount", params)
}

// 预警数据详情查看
export function alertDataDetail(params) {
	return request.get("/app/app/alertDataDetail", params)
}

// 预警事件 -核实
export function handleVerify(params) {
	return request.get("/app/app/verify", params)
}

// 特殊人群统计
export function specialPopulationStatistics(params) {
	return request.get("/app/app/specialPopulationStatistics", params)
}
// 重点人群-特殊人群按时间地点统计
export function getPersonStatistics(params) {
	return request.post("/app/app/critical-person-statistics", params)
}

// 纪律规范-按事件分类统计
export function groupByItem(params) {
	return request.get("/app/app/groupByItem", params)
}

// 纪律规范-按专区分类统计
export function groupByArea(params) {
	return request.get("/app/app/groupByArea", params)
}

// 纪律规范-按事件分类统计
export function groupByWindow(params) {
	return request.get("/app/app/groupByWindow", params)
}

// 纪律规范-窗口在岗率
export function windowOnlineRate(params) {
	return request.get("/app/app/windowOnlineRate", params)
}

// 卓繁人流量原接口
export function appPersonStream(params) {
	return request.get("/app/app/personStream", params)
}

// 大厅监测-大厅某日人流量监测
export function appGetPeopleSteamStatistics(params) {
	return request.get("/app/app/getPeopleSteamStatistics", params)
}

// 前7日人流量监测
export function appOneWeekPeopleStreamStatistics(params) {
	return request.get("/app/app/oneWeekPeopleStreamStatistics", params)
}

// 窗口服务区摄像头列表
export function appGetWinVideoList(params) {
	return request.get("/app/app/win-video-list", params)
}


// 统计差评
export function getBadReviewDepartment(params) {
	return request.get("/app/evaluate/getBadReviewDepartment", params)
}
// 统计差评详情
export function getBadReviewDetail(params) {
	return request.get("/app/evaluate/getBadReviewDetail", params)
}

// 今日预警统计
export function getWarnTotal(params) {
	return request.get("/app/app/public-warning-count", params)
}
// 内部巡查
export function getInnerWarn(params) {
	return request.get("/app/data/inner-warning", params)
}


/**
 * 大厅接待情况
 * @returns
 */
export function getReceiveData(data) {
	return request2.get("/hz-admin/dg/service650", data)
}

/**
 * 获取最新版本
 * @returns
 */
export function getLatestVersion(data) {
	return request.get("/app/app-version/latest-version", data)
}


/**
 * 访客量统计及变化
 * @returns
 */
export function getVisitorsCount(params) {
	return request.post("/app/app/visitors-count", params)
}
/**
 * 访客量图表
 * @returns
 */
export function getVisitorsStatistics(params) {
	return request.post("/app/app/visitors-statistics", params)
}
/**
 * 访客量列表
 * @returns
 */
export function getVisitorsList(params) {
	return request.get("/app/app/weekly-personstream", params)
}